#ifndef PLAYWIDGET_H
#define PLAYWIDGET_H

#include <QWidget>
#include "decodevideothread.h"

namespace Ui {
class PlayWidget;
}

class PlayWidget : public QWidget
{
    Q_OBJECT

public:
    explicit PlayWidget(QWidget *parent = nullptr);
    ~PlayWidget();

    void set_url(QString url);
    void play();
    void stop();

protected:
    void paintEvent(QPaintEvent *);

private slots:
    void slot_receive_image(const QImage &rImg);

private:
    Ui::PlayWidget *ui;
    DecodeVideoThread *mDecodeThread;
    QImage mImg;
};

#endif // PLAYWIDGET_H
